package com.demo.entity.po;

import java.io.Serializable;

import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;

import org.springframework.format.annotation.DateTimeFormat;

/**
 * @Description:违规记录表
 * @Date:2025-03-01
 * @author：author
*/
public class Violation implements Serializable {

	/**
	 * 违规记录ID，主键，自增
	 */
	private Long violationId;

	/**
	 * 违规用户ID，外键
	 */
	private Long userId;

	/**
	 * 违规原因
	 */
	private String reason;

	/**
	 * 处理措施：警告、封禁
	 */
	private Integer action;

	/**
	 * 创建时间
	 */
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private Date createTime;

	private String username;


	private String avatar;

	public String getAvatar() {
		return avatar;
	}

	public void setAvatar(String avatar) {
		this.avatar = avatar;
	}

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public void setViolationId(Long violationId) {
		this.violationId = violationId;
	}

	public Long getViolationId() {
		return this.violationId;
	}

	public void setUserId(Long userId) {
		this.userId = userId;
	}

	public Long getUserId() {
		return this.userId;
	}

	public void setReason(String reason) {
		this.reason = reason;
	}

	public String getReason() {
		return this.reason;
	}

	public void setAction(Integer action) {
		this.action = action;
	}

	public Integer getAction() {
		return this.action;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Date getCreateTime() {
		return this.createTime;
	}

	@Override
	public String toString() {
		return "违规记录ID，主键，自增:" + violationId + ",违规用户ID，外键:" + userId + ",违规原因:" + reason + ",处理措施：警告、封禁:" + action + ",创建时间:" + createTime + "";
	}

}